#include "Type.h"

Type::Type()
{
	// no-op
}

Type::Type(std::string name)
{
	_name = name;
}

Type::~Type()
{

}
/*
std::string Types::get_logLine()
{
	return _logLine;
}

std::string Types::getEntry()
{
	return Entry;
}

std::string Types::getCallnum()
{
	return Callnum;
}

std::string Types::getModel()
{
	return Model;
}
*/
std::string Type::name() const
{
	return _name;
}
/*
std::string Types::getRg()
{
	return Rg;
}

std::string Types::getHp()
{
	return Hp;
}

std::string Types::getTw()
{
	return Tw;
}  

int Types::getNumTypes()
{
	return NumTypes;
}

int Types::getSequence()
{
	return Sequence;
}
*/
std::string Type::firstDate() const
{
	return _firstDate;
}

std::string Type::lastDate() const
{
	return _lastDate;
}

double Type::flights() const
{
	return _flights;
}

double Type::hours() const
{
	return _hours;
}
/*
double Types::getNight()
{
	return Night;
}

double Types::getIfr()
{
	return Ifr;
}

double Types::getGad()
{
	return Gad;
}

double Types::getXc()
{
	return Xc;
}

double Types::getCfi()
{
	return Cfi;
}  

double Types::getDual()
{
	return Dual;
}

double Types::getPic()
{
	return Pic;
}

double Types::getSic()
{
	return Sic;
}
  
double Types::getSft()
{
	return Sft;
}

double Types::getRgHours()
{
	return RgHours;
}

double Types::getHpHours()
{
	return HpHours;
}

double Types::getTwHours()
{
	return TwHours;
}
*/
void Type::setType(std::string name)
{
//	_logLine = new_logLine;
//	Entry = newEntry;
//	Type = newType;
//	Model = newModel;
//	Callnum = newCallnum;
//	Rg = newRg;
//	Hp = newHp;
//	Tw = newTw;
//	NumTypes = -1;
//	Flights = 0;
//	Hours = 0;
//	Night = 0;
//	Ifr = 0;
//	Gad = 0;
//	Xc = 0;
//	Cfi = 0;
//	Dual = 0;
//	Pic = 0;
//	Sic = 0;
//	Sft = 0;
//	RgHours = 0;
//	HpHours = 0;
//	TwHours = 0;
}



void Type::addLogEntry(std::string Date, double newHours)
{
	if (_flights == 0)
		_firstDate = Date;
	_lastDate = Date;
//	if (NumTypes != 10000 && Entry == "model")
//		{
//		if (NumTypes == -1)
//			NumTypes = PlaneIndex;
//		if (NumTypes != PlaneIndex)
//			NumTypes = 10000;
//		}
	++_flights;
	_hours += newHours;
//	Night += newNight;
//	Ifr += newIfr;
//	Gad += newGad;
//	Xc += newXc;
//	Cfi += newCfi;
//	Dual += newDual;
//	Pic += newPic;
//	Sic += newSic;
//	Sft += newSft;
//	if (Entry == "type" || Entry == "totals")
//		{
//		if (newRg == "RG")
//			RgHours += newHours;
//		if (newHp == "HP")
//			HpHours += newHours;
//		if (newTw == "TW")
//			TwHours += newHours;
//		}
}
